#ifndef _BSP_HAL_USART_H_
#define _BSP_HAL_USART_H_

#include <stdio.h>
#include "usart.h"

#ifdef __USART_H__

#if defined(USART1_DMA) || defined(USART2_DMA) || defined(USART3_DMA) || defined(UART4_DMA) || defined(UART5_DMA)
			#define UART_WITH_DMA
#endif

#define Debug_Uart   USART1

#ifdef USART1_DMA
	#define USART1_PData_Len USART1_DMA
	extern DMA_HandleTypeDef hdma_usart1_rx;
	extern DMA_HandleTypeDef hdma_usart1_tx;
	void Usart1_Send(uint8_t* dat,uint16_t Size);
#endif

#ifdef USART2_DMA
	#define USART2_PData_Len USART2_DMA
	extern DMA_HandleTypeDef hdma_usart2_rx;
	extern DMA_HandleTypeDef hdma_usart2_tx;
	void Usart2_Send(uint8_t* dat,uint16_t Size);
#endif

#ifdef USART3_DMA
	#define USART3_PData_Len USART3_DMA
	extern DMA_HandleTypeDef hdma_usart3_rx;
	extern DMA_HandleTypeDef hdma_usart3_tx;
	void Usart3_Send(uint8_t* dat,uint16_t Size);
#endif

#ifdef UART4_DMA
	#define UART4_PData_Len UART4_DMA
	extern DMA_HandleTypeDef hdma_uart4_rx;
	extern DMA_HandleTypeDef hdma_uart4_tx;
	void Uart4_Send(uint8_t* dat,uint16_t Size);
#endif

#ifdef UART5_DMA
	#define UART5_PData_Len UART5_DMA
	extern DMA_HandleTypeDef hdma_uart5_rx;
	extern DMA_HandleTypeDef hdma_uart5_tx;
	void Uart5_Send(uint8_t* dat,uint16_t Size);
#endif

#ifdef UART_WITH_DMA
		void Usart_Init(void);
#endif

	
#endif //__USART_H__

#endif //_BSP_HAL_USART_H_
